package Eyjafjalla.action;

import Eyjafjalla.patch.CloudPatch;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.cards.AbstractCard;

import java.util.Iterator;

public class UpgradeCloudAction extends AbstractGameAction {
    public UpgradeCloudAction(){
        this.actionType = ActionType.CARD_MANIPULATION;
    }

    @Override
    public void update() {

        Iterator<AbstractCard> var1 = CloudPatch.cloudGroup.group.iterator();
        while (var1.hasNext()){
            AbstractCard c = var1.next();
            if (c.canUpgrade()) {
                c.upgrade();
                c.superFlash();
                c.applyPowers();
            }
        }

        this.isDone = true;
    }
}
